<!DOCTYPE html>
<html>
<!--前端界面编写
    编写者：吴茂景
-->
<head>
    <meta charset="utf-8">
    <title>layout 管理界面大布局示例 - Layui</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link href="layui/css/layui.css" rel="stylesheet">
    <script src="layui/layui.js" type="text/javascript" charset="utf-8"></script>
</head>
<body>
<div class="layui-layout layui-layout-admin">
    <div class="layui-header">
        <div class="layui-logo layui-hide-xs layui-bg-black">首页</div>
        <!-- 头部区域（可配合layui 已有的水平导航） -->
        <ul class="layui-nav layui-layout-left">
            <!-- 移动端显示 -->
            <li class="layui-nav-item layui-show-xs-inline-block layui-hide-sm" lay-header-event="menuLeft">
                <i class="layui-icon layui-icon-spread-left"></i>
            </li>
        </ul>
        <ul class="layui-nav layui-layout-right">
            <li class="layui-nav-item layui-hide layui-show-sm-inline-block">
                <a href="User/User-2.html" target="content">
                    <img src="https://unpkg.com/outeres@0.0.10/img/layui/icon-v2.png" class="layui-nav-img">
                    tester
                </a>
            </li>
            <li class="layui-nav-item" lay-header-event="menuRight" lay-unselect>
                <a href="javascript:;">
                    <i class="layui-icon layui-icon-more-vertical"></i>
                </a>
            </li>
        </ul>
    </div>
    <div class="layui-side layui-bg-black">
        <div class="layui-side-scroll">
            <!-- 左侧导航区域（可配合layui已有的垂直导航） -->
            <ul class="layui-nav layui-nav-tree" lay-filter="test">
                <li class="layui-nav-item">
                    <a href="javascript:;">员工信息</a>
                    <dl class="layui-nav-child">
                        <dd><a href="department/Department-2.html" target="content">列表</a></dd>
                        <dd><a href="employee_add.jsp" target="content">新增</a></dd>
                    </dl>
                </li>
                <li class="layui-nav-item">
                    <a href="javascript:;">部门信息</a>
                    <dl class="layui-nav-child">
                        <dd><a href="employee_add.jsp " target="content">列表</a></dd>
                        <dd><a href="employee_add.jsp " target="content">新增</a></dd>
                    </dl>
                </li>
                <li class="layui-nav-item">
                    <a href="javascript:">职位信息</a>
                    <dl class="layui-nav-child">
                        <dd><a href="employee_add.jsp " target="content">列表</a></dd>
                        <dd><a href="employee_add.jsp " target="content">新增</a></dd>
                    </dl>
                </li>
            </ul>
        </div>
    </div>
    <div class="layui-body">
        <!-- 内容主体区域 -->
        <div style="padding: 15px;">
            <iframe name="content" id="content" scrolling="no" style="width: 100%;height: 500px;border: 0px;overflow: hidden;"/>
        </div>
    </div>
    <div class="layui-footer">
        <!-- 底部固定区域 -->
        底部固定区域
    </div>
</div>
<script src="/cdn.staticfile.org/layui/2.8.0/layui.js"></script>
<script>
    //JS
    layui.use(['element', 'layer', 'util'], function(){
        var element = layui.element;
        var layer = layui.layer;
        var util = layui.util;
        var $ = layui.$;
        //头部事件
        util.event('lay-header-event', {
            menuLeft: function(othis){ // 左侧菜单事件
                layer.msg('展开左侧菜单的操作', {icon: 0});
            },
            menuRight: function(){  // 右侧菜单事件
                layer.open({
                    type: 1
                    ,title: '更多'
                    ,content: '<div style="padding: 15px;">处理右侧面板的操作</div>'
                    ,area: ['260px', '100%']
                    ,offset: 'rt' //右上角
                    ,anim: 'slideLeft'
                    ,shadeClose: true
                    ,scrollbar: false
                });
            }
        });
    });
    layui.use(function() {
        var $ = layui.$;
        var layer = layui.layer;
        var util = layui.util;
        // 事件
        util.on('lay-on', {
            'test-iframe-handle': function () {
                layer.open({
                    type: 2,
                    area: ['680px', '450px'],
                    content: 'a.html',
                    fixed: false, // 不固定
                    maxmin: true,
                    shadeClose: true,
                });
            }
        })
    })
</script>
</body>
</html>